set x to item 1 of tocdr
set y to text returned of (display dialog "Size (Megabytes)" default answer "") as number
set dest to choose file name with prompt "choose a destination name and location:"
set a to "hdiutil create -megabytes " & y & " -format UDTO -srcfolder '" & POSIX path of x & "' '" & POSIX path of dest & "'"
do shell script a